Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Thursday, March 22, 2012

custom web app for reportviewer

Hi,

I am trying to develop a custom web page to display and generate our company reports.

It shoud have a login page, and then a general window with 2 or 3 frames (top frame with general info, left frame with a

dynamic list of all existing reports (eventually categorized by a certain word in the report title), and a center frame

that has initialy the company logo and after selecting a specific report displays the parameters and afterwards the

generated report).

Does anybody has some pointers or links on the web where some of this is a little bit documented.

I have dev skills in vb.net and know how to work with ssrs.

My web dev skills are intermediate.

All info, tips, hints are very welcome ...

Greetings

Vinnie

If ou want logic i can provide you that..

code you need to write..

I think you can create login page and list of report..

For the 3rd frame.

keep 3 control there

1 image

2 panel with all the controls thath you need for parameter

3 reportviewer control (property visible = false and size (min that you want)

for 1 - you can initially keep image visible.

on click on list of report make it invicible and make the panel for parameter visible.

2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.

( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte

then parameter would be PatientName,last date.

in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..

So for each parameter I hav one control.

So it would be easy to make them visible as per report name.

After that you need to set report to report viewer

than pass parameter values to report

than database login to report( if needed)

than make report viewer visible.

RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;

string ReportPath = "";

ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ;

if (File.Exists(ReportPath))

{

RptViewer.LocalReport.ReportPath = ReportPath;

//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);

//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;

//RptViewer.ZoomPercent = 100;

RptViewer.LocalReport.DataSources.Clear();

SetReportParameter(weekdate);

RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));

RptViewer.RefreshReport();

}

private void SetReportParameter(DateTime weekenddate)

{

Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;

Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;

ParInfo = RptViewer.LocalReport.GetParameters();

RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];

for (int j = 0; j < ParInfo.Count; j++)

{

switch (ParInfo[j].Name.ToLower())

{

case "centername":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);

break;

case "pweekstartdate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());

break;

case "pweekenddate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());

break;

}

}

RptViewer.LocalReport.SetParameters(RepParameter);

}

private void SetDBLogonForReport(string ReportTitle)

{

Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];

crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();

crd[0].Name = ReportTitle;

crd[0].UserId = User;

crd[0].Password = Pwd;

RptViewer.LocalReport.SetDataSourceCredentials(crd);

}

Hope it helps.. all the best..

|||

If ou want logic i can provide you that..

code you need to write..

I think you can create login page and list of report..

For the 3rd frame.

keep 3 control there

1 image

2 panel with all the controls thath you need for parameter

3 reportviewer control (property visible = false and size (min that you want)

for 1 - you can initially keep image visible.

on click on list of report make it invicible and make the panel for parameter visible.

2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.

( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte

then parameter would be PatientName,last date.

in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..

So for each parameter I hav one control.

So it would be easy to make them visible as per report name.

After that you need to set report to report viewer

than pass parameter values to report

than database login to report( if needed)

than make report viewer visible.

RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;

string ReportPath = "";

ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ConfigurationManager.AppSettings.GetValues("RSReportpath")[0].ToString() + ReportName; // @."c:\code\slimcommon\reporting service reports\rs report\" + ReportTitle + ".rdl";// Application.StartupPath;

if (File.Exists(ReportPath))

{

RptViewer.LocalReport.ReportPath = ReportPath;

//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);

//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;

//RptViewer.ZoomPercent = 100;

RptViewer.LocalReport.DataSources.Clear();

SetReportParameter(weekdate);

RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));

RptViewer.RefreshReport();

}

private void SetReportParameter(DateTime weekenddate)

{

Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;

Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;

ParInfo = RptViewer.LocalReport.GetParameters();

RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];

for (int j = 0; j < ParInfo.Count; j++)

{

switch (ParInfo[j].Name.ToLower())

{

case "centername":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);

break;

case "pweekstartdate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());

break;

case "pweekenddate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());

break;

}

}

RptViewer.LocalReport.SetParameters(RepParameter);

}

private void SetDBLogonForReport(string ReportTitle)

{

Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];

crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();

crd[0].Name = ReportTitle;

crd[0].UserId = User;

crd[0].Password = Pwd;

RptViewer.LocalReport.SetDataSourceCredentials(crd);

}

Hope it helps.. all the best..

sql

Thursday, March 8, 2012

Custom Filter for .msg files

I have an app that is automatically storing e-mails from Outlook in an image
field in SQL 2000. I have found where certain types of files have built in
filter support for searching, but .msg is not included as one of these.
Is anyone aware of anyway to do searches on the .msg file type within SQL.
BOL references the ability to create custom filters, but I am unable to find
the reference.
TIA,
J. Clay
did you try the following?
open up hkey_classes_root, locate msg, add a sub key to .msg called
PersistentHandler, add a string value called (Default)
with the value {5645C8C2-E277-11CF-8FDA-00AA0X0A14F93}
this uses mimefilt.dll which should be on most modern os's - win2k and
above.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"J. Clay" <JClay@.NoSpam.nospam> wrote in message
news:ew8U6WNUFHA.628@.TK2MSFTNGP09.phx.gbl...
> I have an app that is automatically storing e-mails from Outlook in an
image
> field in SQL 2000. I have found where certain types of files have built
in
> filter support for searching, but .msg is not included as one of these.
> Is anyone aware of anyway to do searches on the .msg file type within SQL.
> BOL references the ability to create custom filters, but I am unable to
find
> the reference.
> TIA,
> J. Clay
>
>
|||No. (Wouldn't have known how!) I will give it a try though and report
back.
Thank you very much!
Jim
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:O$osm5NUFHA.3280@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> did you try the following?
> open up hkey_classes_root, locate msg, add a sub key to .msg called
> PersistentHandler, add a string value called (Default)
> with the value {5645C8C2-E277-11CF-8FDA-00AA0X0A14F93}
> this uses mimefilt.dll which should be on most modern os's - win2k and
> above.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "J. Clay" <JClay@.NoSpam.nospam> wrote in message
> news:ew8U6WNUFHA.628@.TK2MSFTNGP09.phx.gbl...
> image
> in
SQL.
> find
>
>
|||Actually MIME IFilter is capable of extracting text, but it does not deal
with attachments. In order to have full access to the information inside
..msg file I suggest using MSG IFilter, developed by Alna:
http://www.alna.com/vid.php4?mid=93&cat_id=4&prod_id=2.
Best regards,
Michailas
"J. Clay" <JClay@.NoSpam.nospam> wrote in message
news:OTUOX9NUFHA.3596@.TK2MSFTNGP14.phx.gbl...
> No. (Wouldn't have known how!) I will give it a try though and report
> back.
> Thank you very much!
> Jim
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:O$osm5NUFHA.3280@.TK2MSFTNGP09.phx.gbl...
> SQL.
>
>
|||Thanks Michailas - I think that is what I am looking for. I will make some
inquiries.
Regards,
Jim
"MT" <mtraubas@.alna.lt> wrote in message
news:%23E4qd1hUFHA.3716@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Actually MIME IFilter is capable of extracting text, but it does not deal
> with attachments. In order to have full access to the information inside
> .msg file I suggest using MSG IFilter, developed by Alna:
> http://www.alna.com/vid.php4?mid=93&cat_id=4&prod_id=2.
> Best regards,
> Michailas
>
> "J. Clay" <JClay@.NoSpam.nospam> wrote in message
> news:OTUOX9NUFHA.3596@.TK2MSFTNGP14.phx.gbl...
an[vbcol=seagreen]
these.[vbcol=seagreen]
to
>
>

Friday, February 17, 2012

custom assembly cant read app.config file.

i added an app.config to my custom assembly but when i try
to read keys from it i get Nothing back.
my config file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SERVER" value="j4b-web-srv6" />
<add key="DATABASE" value="GUIDEWEBLIVE" />
<add key="USER" value="sa" />
<add key="PASSWORD" value="sqldoor5" />
</appSettings>
<system.diagnostics>
<sources>
<!-- Th
<--snip-->
then i call it like so:
sServer = System.Configuration.ConfigurationManager.AppSettings("SERVER")
the config file is renamed to FundTrackHelper.dll.configHi,
Did you get any error msg when trying to read the config file?
Any resources accessed throught custom assemblie of the report has to be
given proper permission in the assmblie and in the reports server config
policy file. Did you do that before accessing file?
in the assemblie you have to do something like this..
FileIOPermission FIOPermRead = new
FileIOPermission(FileIOPermissionAccess.Read, strPath);
FIOPermRead.Assert();
let me know if this helps
~Bava
"taz" wrote:
> i added an app.config to my custom assembly but when i try
> to read keys from it i get Nothing back.
> my config file looks like this:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <appSettings>
> <add key="SERVER" value="j4b-web-srv6" />
> <add key="DATABASE" value="GUIDEWEBLIVE" />
> <add key="USER" value="sa" />
> <add key="PASSWORD" value="sqldoor5" />
> </appSettings>
> <system.diagnostics>
> <sources>
> <!-- Th
> <--snip-->
> then i call it like so:
> sServer = System.Configuration.ConfigurationManager.AppSettings("SERVER")
> the config file is renamed to FundTrackHelper.dll.config
>|||hi,
i didnt get any error msg, it just returns "Nothing".
i did not give it any permissions so i guess thats
what i was missing. i'll give it a try and let u know -
thanks a lot !
t.
"Bava Mani" wrote:
> Hi,
> Did you get any error msg when trying to read the config file?
> Any resources accessed throught custom assemblie of the report has to be
> given proper permission in the assmblie and in the reports server config
> policy file. Did you do that before accessing file?
> in the assemblie you have to do something like this..
> FileIOPermission FIOPermRead = new
> FileIOPermission(FileIOPermissionAccess.Read, strPath);
> FIOPermRead.Assert();
> let me know if this helps
> ~Bava
> "taz" wrote:
> >
> > i added an app.config to my custom assembly but when i try
> > to read keys from it i get Nothing back.
> >
> > my config file looks like this:
> >
> > <?xml version="1.0" encoding="utf-8" ?>
> > <configuration>
> >
> > <appSettings>
> > <add key="SERVER" value="j4b-web-srv6" />
> > <add key="DATABASE" value="GUIDEWEBLIVE" />
> > <add key="USER" value="sa" />
> > <add key="PASSWORD" value="sqldoor5" />
> > </appSettings>
> >
> > <system.diagnostics>
> > <sources>
> > <!-- Th
> >
> > <--snip-->
> >
> > then i call it like so:
> >
> > sServer = System.Configuration.ConfigurationManager.AppSettings("SERVER")
> >
> > the config file is renamed to FundTrackHelper.dll.config
> >