Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Friday, March 30, 2012

please help me to cearte this stored procedure

Hi ,

I want to make a report of records of a table, there is abut 15 fields that this report based on them , so we need a select query like this

Select f1,f2from Table1where f3=@.f3and f4=@.f4 and ….and f17=@.f17

-- f1 = field1 and ….

The problem is sometimes @.fs are empty, for example if @.f4was empty so "and f4=@.f4" should be excluded from the select query .(and it means there is no limitation for f4 field)

I know, probably I couldn't explain my purpose very well,Embarrassed but I hope somebody kindly try to understand it .

how can I perform that in a stored procedure?

Please help me

Thank you

try it like this:

SELECT f1,f2FROM Table1WHERE (f3=@.f3OR @.f3ISNULL)AND (f4=@.f4OR @.f4ISNULL)AND ….AND (f17=@.f17OR @.f17ISNULL)
|||

Is in your example @.f4 empty or null? I think null, so I created the following query for you:

Select

f1from table1where f1= @.f1and(f4= @.f4or @.f4isnull)

This query selects all the records where f1 matches @.f1 and f4 matches @.f4 or @.f4 is null (and will be ignored then).

I hope this helps

Richard

|||

mbanavige & richardsoeteman.net thank you very, very much!.

|||

Hi

Assume there are 3 tables like these:

Table0

Primary key

Name

1

Name1

2

Name2

3

Name3

Table 1:

Foreign key

Column1

1

Data1

2

Data1

Table2:

Foreign key

Column2

2

Data2

3

Data2

And there are 2 parameters that they may be null: @.Data1 and @.Data2

I need a select query that

-selects "Name2" from Table0 if:

@.Data1="Data1"

@.Data2="Data2"

-selects "Name1, Name2" from Table0 if:

@.Data1="Data1"

@.Data2=null

-selects "Name2, Name3" from Table0 if:

@.Data1=null

@.Data2="Data2"

And selects "Name1, Name2, Name3" from Table0 if both of@.Data1 &@.Data2 wasnull.

I know I did not explain very well again but it's the final step of my project and I really need help. So please help me again Embarrassed

Thanks,

|||

Same concept:

Read this post:http://forums.asp.net/thread/1440706.aspx

|||

thank you Mike,

What about parameters that areint ordecimal and we want to ignore them , they can not benull ,they can be 0.

thank you Mike,

|||

You can use the same concept

Select

f1from table1where(f1= @.f1or @.f1=0)

|||Thank you Richard,

Please Help me 'DrillthroughSourceQuery' parameter is missing a value in report builder

Can u help to to solve my problem . Many time this question arised in the forum no one answer to me to find out the solution for my problem. So please help

I am using report builder thru LocalHost\Report . I want a drill through report by using Report Builder and cube . I created the report but unfortunatly I cannot create a drill through report using parameters .How can I pass parameter in report1 to jump into report2 .

When I running the report after giving drill through properties in report the following error will occure.

'The 'DrillthroughSourceQuery' parameter is missing a value

How can I create a report using parameter for drill down in report builder

I am expecting one answer from u expertise

-Create a report with your needed entities and save it in Report builder as RDL file.

-Import it in a Reporting project

-Design your report as needed

-Deploy it on the Report Server

-Use SSMS to connect to the Reporting Server and navigate to the model

-Connect the Report with the single / multi instance of your entity within the model.

Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Hi Jens,

Could you please elaborate on the steps.

In my scenario the report rdl file is on some other server and the folder is not shared, how do i impport the rdl file in reporting project. Could you please elaborate on "Use SSMS to connect to the Reporting Server and navigate to the model"

Regards

Neeraj

Please Help me ''DrillthroughSourceQuery'' parameter is missing a value in report builder

Can u help to to solve my problem . Many time this question arised in the forum no one answer to me to find out the solution for my problem. So please help

I am using report builder thru LocalHost\Report . I want a drill through report by using Report Builder and cube . I created the report but unfortunatly I cannot create a drill through report using parameters .How can I pass parameter in report1 to jump into report2 .

When I running the report after giving drill through properties in report the following error will occure.

'The 'DrillthroughSourceQuery' parameter is missing a value

How can I create a report using parameter for drill down in report builder

I am expecting one answer from u expertise

-Create a report with your needed entities and save it in Report builder as RDL file.

-Import it in a Reporting project

-Design your report as needed

-Deploy it on the Report Server

-Use SSMS to connect to the Reporting Server and navigate to the model

-Connect the Report with the single / multi instance of your entity within the model.

Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Hi Jens,

Could you please elaborate on the steps.

In my scenario the report rdl file is on some other server and the folder is not shared, how do i impport the rdl file in reporting project. Could you please elaborate on "Use SSMS to connect to the Reporting Server and navigate to the model"

Regards

Neeraj

sql

Please Help me ->Bruce Loehle-Conger

Hello Bruce, my name's Carlos and i have a big problem, i have two reports
the firtone is the "master report", and this jump to a second report, but
when the second report show, the parameter bar is hidde, and when i back to
the master report, the parameter bar is also hidden.
Could yuo help me please.
Thanks.I had the same problem. I found a work around, but probably not the best way.
Right now I just used the "jump to url" under navigation and put: ="?" &
Globals!ReportFolder & "/report_name"
"Carlos López." wrote:
> Hello Bruce, my name's Carlos and i have a big problem, i have two reports
> the firtone is the "master report", and this jump to a second report, but
> when the second report show, the parameter bar is hidde, and when i back to
> the master report, the parameter bar is also hidden.
> Could yuo help me please.
> Thanks.|||Thanks scraejtp, i will try this and i will tell you the result.
I found a blog where someone suggest to use the parameter rc:parameter=true
in the query string, but don't work for me,
"scraejtp" wrote:
> I had the same problem. I found a work around, but probably not the best way.
> Right now I just used the "jump to url" under navigation and put: ="?" &
> Globals!ReportFolder & "/report_name"
>
> "Carlos López." wrote:
> > Hello Bruce, my name's Carlos and i have a big problem, i have two reports
> > the firtone is the "master report", and this jump to a second report, but
> > when the second report show, the parameter bar is hidde, and when i back to
> > the master report, the parameter bar is also hidden.
> >
> > Could yuo help me please.
> >
> > Thanks.

Please Help me

Dear All

Please help me to give drill down feature in report builder -> Report properties. How can I give bound to an entity in the data source

What is DrillthroughSourceQuery , DrillthroughContext in parameter

I have 2 report

1. report 1

2. Report 2

I want to drill through report2 from report1 Hw can I give DrillthroughSourceQuery and

DrillthroughContext in parameter

Please help me....

Let's see if I understand what you are asking. If you want to drill through to report 2 from report 1 then you need to right-click on the object that you will use for drilling purposes. Click on the Navigation tab. Choose Jump to Report and select Report 2. Click the Parameters button and set your parameters. If you have a dynamic query for Report 2, you will need to pass the necessary information through a parameter.

Hope this helps.

Simone

|||

Dear Simon

There is no navigation tab becuase I am using report builder thru LocalHost\Report . I am beginner in report server Please help. How can I pass parameter in report1 to jump into report2 .

While running report 1 error message is coming 'The 'DrillthroughSourceQuery' parameter is missing a value

How can i Pass parameter

|||

Sorry about that. I don't normally use Report Builder. Maybe this article will help:

http://msdn2.microsoft.com/en-us/library/ms345252.aspx

Please help me

I'm in a trouble with crystal report 8.5. My printer only uses for A4 sheet. But I want to make a report with A3 scale. So please show me the way to compose in two A4 sheets instead of A3.
Thank you very much!When designing the report you need to design according to that formatsql

Please help its urgent

i have a data which will be updated daily in database.. my crystal report will show all that data..

Now here is da query on which i need help..

Take an example i have values shown on report.. eg

100

300

500

900

1000

.......

note above values will keep on increasing every day..

OUTPUT should be

300 - 100 = 200

500 - 300= 200 .......

so its like i want difference by subracting second value (D2) minus (D1) and then (D3) minus (D2) and so on till it encounters last row.

ACTUAL VALUES ........ how can i get
FROM DB ....... DIFFERENCE OUTPUT ...... OUTPUT

100 ............... ( 300 minus 100 ) ....... 200

300 ............... ( 500 minus 300 ) ....... 200

500 ............... ( 900 minus 500 ) ....... 400

900 ............... ( 1000 minus 900 ) ....... 100

1000 ............... last row will be blank as below this der is no row

i hope u ppl get ma query and plz help me.. its urgentNext({field}) - {field}

Please Help In This Formula

HELLO FRIEND,

I have accounting app and i have some problem in crystal report formula to get statement of account

for example bank statement .


Dr Cr Bal

0 100 100

0 150 350

50 0 300

20 0 280

0 140 420

PLEASE IF U KNOW ANY FORMULA TO SOLVE THIS PROBLE SEN IT

THANKStry this formula in detail section

whileprintingrecords;
numbervar a;
if dr then
a=a+dr
else
a=a-cr


if u need to reset this formula to zero , make another formula and use it in group section

whileprintingrecords;
numbervar a;
a:=0;

Wednesday, March 28, 2012

Please help- hairloss imminent (ProcessingAbortedException)

Hi,

I hope someone can help with this one!

We have a report which runs fine interactively - no matter which range we set it to run against, but when run as a subscription it failes. Taking a closer look at the logs, I get the following info :

ReportingServicesService!processing!1ac!1/3/2006-08:22:24:: w WARN: Data source 'DWOR': Report processing has been aborted.
ReportingServicesService!processing!1ac!1/3/2006-08:22:24:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. > Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'DataSet1'. > System.Data.SqlClient.SqlException: Operation cancelled by user.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.DataExtensions.CommandWrapper.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.ReportProcessing.a1.v()
End of inner exception stack trace
at Microsoft.ReportingServices.ReportProcessing.a1.v()
at Microsoft.ReportingServices.ReportProcessing.ax.c()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.ax.b()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Object A_0)
End of inner exception stack trace
ReportingServicesService!library!1ac!01/03/2006-08:22:24:: i INFO: Initializing EnableExecutionLogging to 'True' as specified in Server system properties.
ReportingServicesService!subscription!1ac!01/03/2006-08:22:24:: Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has occurred during report processing. > Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. > Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'DataSet1'. > System.Data.SqlClient.SqlException: Operation cancelled by user.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.DataExtensions.CommandWrapper.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.ReportProcessing.a1.v()
End of inner exception stack trace
at Microsoft.ReportingServices.ReportProcessing.a1.v()
at Microsoft.ReportingServices.ReportProcessing.ax.c()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.ax.b()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Object A_0)
End of inner exception stack trace
at Microsoft.ReportingServices.ReportProcessing.b.c()
at Microsoft.ReportingServices.ReportProcessing.ab.ag()
at Microsoft.ReportingServices.ReportProcessing.bb.b(ParameterInfoCollection A_0, Boolean A_1)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(Report A_0, ProcessingContext A_1, Boolean A_2, GetReportChunk A_3, az A_4, DateTime A_5, CreateReportChunk A_6, ab& A_7)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(DateTime A_0, GetReportChunk A_1, ProcessingContext A_2, RenderingContext A_3, CreateReportChunk A_4, Boolean& A_5)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc)
at Microsoft.ReportingServices.Library.RSService.RenderAsLive(CatalogItemContext reportContext, ItemProperties properties, ParameterInfoCollection effectiveParameters, Guid reportId, ClientRequest session, String description, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection thisReportDataSources, Boolean cachingRequested, Warning[]& warnings, ReportSnapshot& resultSnapshotData, DateTime& executionDateTime, RuntimeDataSourceInfoCollection& alldataSources, UserProfileState& usedUserProfile)
at Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)
at Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
End of inner exception stack trace
at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.ReportImpl.Render(String renderFormat, String deviceInfo)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.SaveReport(Notification notification, SubscriptionData data)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.Deliver(Notification notification)

I've checked everything I can think of, so far no luck. I've also run the report in the background as different users, still no joy.

The bizarre thing is it's been working fine up until a couple of weeks ago, then all of a sudden this occurs.

Any help much appreciated!

Cheers,

Tony

Managed to resolve the issue myself in the end! I noticed that in the RunningJobs table within the RS database, the timeout was set to the default of 1800 seconds. Strangely enough that's how long it took for the above error to occur. I've changed the report target properties execution settings to 5400, and that has done the trick.

Talk about misleading error messages - no timeouts mentioned in the log files!

Hope this helps others out.

|||

I've been having a not too different problem, I'm just trying to find the "report taget properties execution settings"... where are they found?

Please help- hairloss imminent (ProcessingAbortedException)

Hi,

I hope someone can help with this one!

We have a report which runs fine interactively - no matter which range we set it to run against, but when run as a subscription it failes. Taking a closer look at the logs, I get the following info :

ReportingServicesService!processing!1ac!1/3/2006-08:22:24:: w WARN: Data source 'DWOR': Report processing has been aborted.
ReportingServicesService!processing!1ac!1/3/2006-08:22:24:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. > Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'DataSet1'. > System.Data.SqlClient.SqlException: Operation cancelled by user.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.DataExtensions.CommandWrapper.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.ReportProcessing.a1.v()
End of inner exception stack trace
at Microsoft.ReportingServices.ReportProcessing.a1.v()
at Microsoft.ReportingServices.ReportProcessing.ax.c()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.ax.b()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Object A_0)
End of inner exception stack trace
ReportingServicesService!library!1ac!01/03/2006-08:22:24:: i INFO: Initializing EnableExecutionLogging to 'True' as specified in Server system properties.
ReportingServicesService!subscription!1ac!01/03/2006-08:22:24:: Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has occurred during report processing. > Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. > Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'DataSet1'. > System.Data.SqlClient.SqlException: Operation cancelled by user.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.DataExtensions.CommandWrapper.ExecuteReader(CommandBehavior behavior)
at Microsoft.ReportingServices.ReportProcessing.a1.v()
End of inner exception stack trace
at Microsoft.ReportingServices.ReportProcessing.a1.v()
at Microsoft.ReportingServices.ReportProcessing.ax.c()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.ax.b()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Object A_0)
End of inner exception stack trace
at Microsoft.ReportingServices.ReportProcessing.b.c()
at Microsoft.ReportingServices.ReportProcessing.ab.ag()
at Microsoft.ReportingServices.ReportProcessing.bb.b(ParameterInfoCollection A_0, Boolean A_1)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(Report A_0, ProcessingContext A_1, Boolean A_2, GetReportChunk A_3, az A_4, DateTime A_5, CreateReportChunk A_6, ab& A_7)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(DateTime A_0, GetReportChunk A_1, ProcessingContext A_2, RenderingContext A_3, CreateReportChunk A_4, Boolean& A_5)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc)
at Microsoft.ReportingServices.Library.RSService.RenderAsLive(CatalogItemContext reportContext, ItemProperties properties, ParameterInfoCollection effectiveParameters, Guid reportId, ClientRequest session, String description, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection thisReportDataSources, Boolean cachingRequested, Warning[]& warnings, ReportSnapshot& resultSnapshotData, DateTime& executionDateTime, RuntimeDataSourceInfoCollection& alldataSources, UserProfileState& usedUserProfile)
at Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)
at Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
End of inner exception stack trace
at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.ReportImpl.Render(String renderFormat, String deviceInfo)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.SaveReport(Notification notification, SubscriptionData data)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.Deliver(Notification notification)

I've checked everything I can think of, so far no luck. I've also run the report in the background as different users, still no joy.

The bizarre thing is it's been working fine up until a couple of weeks ago, then all of a sudden this occurs.

Any help much appreciated!

Cheers,

Tony

Managed to resolve the issue myself in the end! I noticed that in the RunningJobs table within the RS database, the timeout was set to the default of 1800 seconds. Strangely enough that's how long it took for the above error to occur. I've changed the report target properties execution settings to 5400, and that has done the trick.

Talk about misleading error messages - no timeouts mentioned in the log files!

Hope this helps others out.

|||

I've been having a not too different problem, I'm just trying to find the "report taget properties execution settings"... where are they found?

please help before I kill myself over this problem...

have a report that takes 1 parameter on a report server.

Trying to call the report using the reportviewer control

All I want to do is set the report parameter in code.

Dim rp = New Microsoft.Reporting.WinForms.ReportParameter

rp.Name = "InvoiceNumber"

rp.Values.Add("0618050")

Me.ReportViewer1.ServerReport.SetParameters(rp)

Me.ReportViewer1.ShowParameterPrompts = False

ReportViewer1.RefreshReport()

This always fails. I can't figure out how to add the report parameter to the control. PLEASE save me.

I haven't done this myself, but I did see an sample in the help files. Here's a snippet:

// Create the sales order number report parameter
ReportParameter salesOrderNumber = new ReportParameter();
salesOrderNumber.Name = "SalesOrderNumber";
salesOrderNumber.Values.Add("SO43661");

// Set the report parameters for the report
reportViewer1.ServerReport.SetParameters(
new ReportParameter[] { salesOrderNumber });

// Refresh the report
reportViewer1.RefreshReport();

I found this in my local reporting services help under 'Integrating Reporting Services Into Applications'-> 'Integrating Reporting Services Using the Report Viewer Control'.

I hope this helps- please don't kill yourself over microsoft code!!!!

|||what would this be in vb.net?|||

here is what I get in vb.net

Dim salesOrderNumber As ReportParameter = New ReportParameter()

salesOrderNumber.Name = "InvoiceNumber"

salesOrderNumber.Values.Add("0618050")

' Set the report parameters for the report

dim reportparameters() as ReportViewer1.ServerReport.SetParameters(new salesOrderNumber)

except where "new" is I get an error saying that "array bounds cannot appear in type specifiers"

Monday, March 26, 2012

Please help - Is this even possible?

I am executing multiple stored procedures in a stored procedure, pulling back a table of results, which is activated by a crystal report. One of the stored procedures activates a DTS Package. My problem is that the activation of the dts package returns output results, which in turn throws off my crystal report. Is there a way to still run this stored procedure as is but without returning the DTS output results??

I am using Sql 2000 and Crystal 8.5.

I would really appreciate any suggestions.

ThanksYou can create the temp table and insert the execution of the dts package into the temp table. This will "capture" the results and effectively mask them from being seen as output. You will also probably want to use SET NOCOUNT ON in your procedure.

Please help - Is this even possible?

I am executing multiple stored procedures in a stored procedure, pulling back a table of results, which is activated by a crystal report. One of the stored procedures activates a DTS Package. My problem is that the activation of the dts package returns output results, which in turn throws off my crystal report. Is there a way to still run this stored procedure as is but without returning the DTS output results??

I am using Sql 2000 and Crystal 8.5.

I would really appreciate any suggestions.

ThanksYou'd be more likely to get an answer to this question in the MS-SQL forum (http://www.dbforums.com/f7).

-PatPsql

Please help - data looks god, but nothing on report!

1. Created DataSet which contains a DataTable.

2. ReportViewer points to .rdlc report.

3. .rdlc report uses DataSet above.

4. Progamatically load DataTable from other tables.

5. In debug, dataset looks good, but NO data on report.

I have been working on this silly report for 4 days! Please help.

My appologies for the typo in the message subject.

Any ideas?

Friday, March 23, 2012

Please give me your suggestions on Report Query - Very Urgent

I need to disaplay number of Active Agencies on monthwise in one of my report. I have tbl_Agency table with ActiveDate and ActiveFlag. ActiveDate column contains always first Activation Date. If any chances in the agencies(update/delete) the same record will move to tbl_AgencyHistory table.

"If an agency is inactivated in September 10th, inactivated all of October, and then reactivated November 10th - the agency would be counted in September, not in October and counted in November"

ActiveDate column has always first activation date, I could not meet this requirement. This is very urgent issue, Could you please help me on this.

Thanks,

Malar

Malar:

You want a monthly summary such as:

Month ActiveCt
-- -
2006 January 27
2006 February 30
2006 March 45
2006 April 55
2006 May 61
2006 August 27
2006 September 29
2006 October 35
2006 November 60
2006 December 63

The source tables need to include both the home table plus the history table?

Dave

|||

Malar:

Please review the following scenario and verify if I understand your update process correctly:


Acme Coyote Co gets first activitated on 8/15:

tbl_agency: agencyName='Acme Coyote Co', activeFlag='Y', activenDate='8/15/6'
( there are no history records for 'Acme Coyote Co'

Acme Coyote Co goes inactive on 9/10:

tbl_agency: agencyName='Acme Coyote Co', activeFlag='N', activeDate='9/10/6'
tbl_agencyHist: seq=1, agencyName='Acme Coyote Co', activeFlag='Y', activeDate='8/15/6'

Acme Coyote Co re-activates on 11/07:


tbl_agency: agencyName='Acme Coyote Co', activeFlag='Y', activeDate='11/7/6'
tbl_agencyHist: seq=1, agencyName='Acme Coyote Co', activeFlag='Y', activeDate='8/15/6'
tbl_agencyHist: seq=2, agencyName='Acme Coyote Co', activeFlag='N', activeDate='9/10/6'

|||

Hi Mugambo,

Thanks for your reply. I need to display out put like this.

Year Month ExistingActiveCt NewActiveCt
-- -
2006 January 27 3
2006 February 30 15
2006 March 45 10
2006 April 55 6
2006 May 61 0
2006 August 27 2
2006 September 29 6
2006 October 35 25
2006 November 60 3
2006 December 63 0

Above your query explanation is correct. We have ModifiedOn column in both the tables. If any of Agency is inactivated, tbl_Agency table in ModifiedOn is updated with current date. The previous record is in historty table ModifiedOn also updated with current date.

Thanks,

Malar

|||

Malar:

Please forgive the long-winded jazz that follows. This went much more over-the-top for me that I had planned. First, I use my iterator table -- a table of numbers -- as part of the routine. The iterator table can implemented as:

-- -
-- I use my iterator table as a read-only untility table from time to time.
-- The best write-up for this type of thing is given as a table of numbers
-- at the website:
--
-- http://sqlserver2000.databases.aspfaq.com/why-should-i-consider-using-an-auxiliary-numbers-table.html
-- -
if exists
( select 0 from sysobjects
where type = 'U'
and id = object_id ('dbo.SMALL_ITERATOR')
)
drop table dbo.SMALL_ITERATOR
go

create table dbo.SMALL_ITERATOR
( iter smallint not null
constraint PK_SMALL_ITERATOR primary key
)
go


-- -
-- Here, we use the master "spt_values" table to load initial values into
-- the small iterator table.
--
-- NOTE:
--
-- Use of the spt_values in this situation is an undocumented SQL Server
-- feature. In fact, SQL Server 2000 has values 0-255 while SQL Server
-- 2005 has values 0-2047 so beware! This "built-in table of numbers" can
-- be dangerous!
--
-- I restrict the domain of numbers here 0-255 for the sake of providing a
-- little more safety.
-- -
truncate table SMALL_ITERATOR

insert into small_iterator
select number from master.dbo.spt_values
where name is null
and number <= 255


insert into small_iterator
select 256 * j.iter + i.iter
from small_iterator i
inner join small_iterator j
on j.iter > 0
and j.iter <= 128
and 256 * j.iter + i.iter <= 32767

delete from small_iterator where iter = 0

select count(*) [count],
min (iter) [min iterator],
max (iter) [max iterator]
from SMALL_ITERATOR

go

dbcc dbreindex (small_iterator, '', 100)
go

update statistics small_iterator
go

exec sp_recompile small_iterator
go

The actual report code:

-- -
-- Hang on to your hat and holy moly this is nasty.
--
-- I guess what bugs me most about all of this has to do with the UNIONs
-- that are necessary because not all of the records are retained in the
-- history table.
--
-- Notice that there are at least a couple of benefits to be derived by
-- keeping all records -- even a copy of the current record -- in the
-- history table:
--
-- (1) The UNIONS for this report and for any other report that must
-- account for history are eliminated
-- (2) Elimination the UNIONS means that these types of report processes,
-- which likely process by table scan, now no longer have to impact
-- the current record table. This can eliminate a heavy kind of
-- contention away from the primary table
-- -
set nocount on
set ansi_warnings off

declare @.matrixYr char (4) set @.matrixYr = '2006'
declare @.baseDt datetime set @.baseDt = '1/1/'+@.matrixYr

--select @.matrixYr as [@.matrixYr],
-- @.baseDt as [@.baseDt]

-- -
-- Generate mockup table for testing. uncomment the other insert
-- statements to test with more data.
-- -
declare @.agency table
( agency_id integer not null primary key,
agencyName varchar (30) not null,
activeFlag char (1) not null,
activeDate datetime not null
)

declare @.agencyHist table
( agency_id integer not null,
seq integer not null,
agencyName varchar (30) not null,
activeFlag char (1) not null,
activeDate datetime not null
)


insert into @.agency values (1, 'Acme Coyote Co', 'Y', '11/7/6')
insert into @.AgencyHist values (1, 1, 'Acme Coyote Co', 'Y', '1/31/6')
insert into @.agencyHist values (1, 2, 'Acme Coyote Co', 'N', '2/14/6')
insert into @.agencyHist values (1, 3, 'Acme Coyote Co', 'Y', '4/17/6')
insert into @.agencyHist values (1, 4, 'Acme Coyote Co', 'N', '4/19/6')
insert into @.AgencyHist values (1, 5, 'Acme Coyote Co', 'Y', '8/15/6')
insert into @.agencyHist values (1, 6, 'Acme Coyote Co', 'N', '9/10/6')


/*
insert into @.agency values (2, 'Ralph''s Plumbing', 'N', '5/7/6')
insert into @.AgencyHist values (2, 1, 'Ralph''s Plumbing', 'Y', '12/7/5')

insert into @.agency values (3, 'Tricky Ricky Taffy', 'Y', '9/7/6')
insert into @.AgencyHist values (3, 1, 'Tricky Ricky Taffy', 'Y', '9/9/5')
insert into @.agencyHist values (3, 2, 'Tricky Ricky Taffy', 'N', '4/19/6')

insert into @.agency values (4, 'Gopher Tunnelling', 'Y', '7/14/6')

insert into @.agency values (5, 'Random Certainty Co', 'Y', '12/1/5')

insert into @.agency values (11, 'Bad Records 1', 'N', '4/21/6')
insert into @.AgencyHist values (11, 1, 'Bad Records 1', 'Y', '2/14/6')
insert into @.agencyHist values (11, 2, 'Bad Records 1', 'Y', '2/15/6')


insert into @.agency values (12, 'Bad Records 2', 'N', '7/7/6')
insert into @.AgencyHist values (12, 1, 'Bad Records 2', 'Y', '6/1/6')
insert into @.agencyHist values (12, 2, 'Bad Records 2', 'N', '6/1/6')

insert into @.agency values (13, 'Bad Records 3', 'N', '11/24/6')
insert into @.AgencyHist values (13, 1, 'Bad Records 3', 'Y', '9/14/6')
insert into @.agencyHist values (13, 2, 'Bad Records 3', 'Y', '10/21/6')
insert into @.agencyHist values (13, 3, 'Bad Records 3', 'N', '10/29/6')
*/

--print '-- @.AGENCY --'
--select * from @.agency
--select * from @.agencyHist


-- -
-- This is what scalds me the most. I don't care for the union
-- in combination with the self left join of the complement of the union.
--
-- It might be a good idea to use NOLOCK hints on each of these tables
-- since this is a report.
--
-- If you always get ZERO scrubbed records, the scrubbing routine can be
-- eliminated. To elimnate the scrub routine change the target table
-- of the next insert from @.rawInterval to @.interval and remove the code
-- that moves scrubbed records from the @.rawInterval table into the
-- @.interval table.
-- -
declare @.rawInterval table
( agency_id integer not null,
startDate datetime not null,
endDate datetime not null,
primary key (endDate, startDate, agency_id)
)

--insert into @.interval -- ONLY if the data is CLEAN!
insert into @.rawInterval
select a.agency_id,
a.activeDate as startDate,
isnull (min (b.activeDate), '12/31/3999 23:59:59.997') as endDate
from ( select agency_id,
agencyName,
activeDate
from @.agency
where activeFlag = 'Y'
union
select agency_id,
agencyName,
activeDate
from @.agencyHist
where activeFlag = 'Y'
) a

left join
( select agency_id,
agencyName,
activeDate
from @.agency
where activeFlag <> 'Y'
union
select agency_id,
agencyName,
activeDate
from @.agencyHist
where activeFlag <> 'Y'
) b
on a.agency_id = b.agency_id
and a.activeDate < b.activeDate
group by a.agency_id, a.activeDate

-- print '- RAW INTERVAL -'
-- select * from @.rawInterval


-- -
-- Scrub out the records that cause the problems
--
-- This section can be eliminated if the data is always clean.
-- -

declare @.interval table
( agency_id integer not null,
startDate datetime not null,
endDate datetime
)

insert into @.interval
select a.agency_id,
a.startDate,
a.endDate
from @.rawInterval a
inner join
( select s.agency_id,
min (s.startDate) as min_startDate,
endDate
from @.rawInterval s
group by s.agency_id, s.endDate
) b
on a.agency_id = b.agency_id
and a.startDate = b.min_startDate

--print '-- SCRUBBING: --'
--select * from @.interval

select ( select count(*) from @.rawInterval ) -
( select count(*) from @.interval ) as [Scrubbed Records]

-- -
-- After we do all that hand waving we now write this to an output summary
-- to hold the information. This information will be mergede with the
-- "first time" agencies after the "first time" agency information is
-- compiled.
--
-- Note that the select for this insert uses the "small_iterator" table
-- -
declare @.output table
( period varchar (15) not null,
monthBasis datetime not null,
ExistingActiveCt integer not null
)


insert into @.output
select period,
monthBasis,
sum ( case when i.agency_id is null then 0 else 1 end ) as existingActiveCt
from ( select left (@.matrixYr + ' ' + datename (month,
dateadd (month, iter - 1, @.baseDt)), 15) as period,
dateadd (month, iter - 1, @.baseDt) as monthBasis
from small_iterator (nolock)
where iter <= 12
) m
left join @.interval i
on dateadd (month, 1, m.monthBasis) > i.startDate
and ( m.monthBasis <= i.endDate or i.endDate is null )
group by monthBasis, period
order by monthBasis, period

-- -
-- Picking up the first time agencies looks a little better. But we are
-- still dealing with the same union.
-- -
declare @.firstTime table
( monthBasis datetime not null,
newActiveCt integer not null
)

insert into @.firstTime
select convert (datetime, activationMonth + '/1/' + activationYear),
newActiveCt
from ( select convert (varchar(2), month (activeDate)) as activationMonth,
convert (varchar(4), year (activeDate)) as activationYear,
count (*) as newActiveCt
from ( select agency_id,
min (activeDate) as activeDate
from ( select agency_id,
min(activeDate) as activeDate
from @.agency
where activeFlag = 'Y'
group by agency_id
union
select agency_id,
min (activeDate)
from @.agencyHist
where activeFlag = 'Y'
group by agency_id
) j
group by agency_id
having min (activeDate) >= @.baseDt
) x
group by convert (varchar(2), month (activeDate)),
convert (varchar(4), year (activeDate))
) act


--select * from @.firstTime

-- -
-- And after all of that work we get a small report.
--
-- What a way to run a railroad.
-- -
select a.period,
a.ExistingActiveCt,
isnull (b.NewActiveCt, 0) as NewActiveCt
from @.output a
left outer join @.firstTime b
on a.monthBasis = b.monthBasis
order by a.monthBasis

set ansi_warnings on

-- -
-- Output with "Acme Coyote Co" only
-- -


-- Scrubbed Records
-- -
-- 0

-- period ExistingActiveCt NewActiveCt
-- - --
-- 2006 January 1 1
-- 2006 February 1 0
-- 2006 March 0 0
-- 2006 April 1 0
-- 2006 May 0 0
-- 2006 June 0 0
-- 2006 July 0 0
-- 2006 August 1 0
-- 2006 September 1 0
-- 2006 October 0 0
-- 2006 November 1 0
-- 2006 December 1 0

-- -
-- Output with all records
-- -


-- Scrubbed Records
-- -
-- 2

-- period ExistingActiveCt NewActiveCt
-- - --
-- 2006 January 4 1
-- 2006 February 5 1
-- 2006 March 4 0
-- 2006 April 5 0
-- 2006 May 2 0
-- 2006 June 2 1
-- 2006 July 3 1
-- 2006 August 3 0
-- 2006 September 5 1
-- 2006 October 4 0
-- 2006 November 4 0
-- 2006 December 4 0

|||

Thanks Mugambo,

I have not used iteration. Because I need only 12 rows. Remaining logic is the same.

Thanks,

Malar

set nocount on
set ansi_warnings off

-- -
-- Generate mockup table for testing. uncomment the other insert
-- statements to test with more data.
-- -

declare @.agency table
( AgencyID integer not null primary key,
AgencyName varchar (30) not null,
ActiveInd BIT not null,
ActivationDt datetime not null
)
declare @.agencyHist table
( AgencyID integer not null,
seq integer not null, --primary key
AgencyName varchar (30) not null,
ActiveInd char (1) not null,
ActivationDt datetime not null
)


insert into @.agency values (1, 'Acme Coyote Co', 1, '9/10/6')
insert into @.AgencyHist values (1, 1, 'Acme Coyote Co', 0, '1/15/6')
insert into @.AgencyHist values (1, 2, 'Acme Coyote Co', 1, '1/31/6')
insert into @.agencyHist values (1, 3, 'Acme Coyote Co', 0, '2/14/6')
insert into @.agencyHist values (1, 4, 'Acme Coyote Co', 1, '4/17/6')
insert into @.agencyHist values (1, 5, 'Acme Coyote Co', 0, '4/19/6')
insert into @.AgencyHist values (1, 6, 'Acme Coyote Co', 1, '8/15/6')
insert into @.AgencyHist values (1, 7, 'Acme Coyote Co', 0, '9/10/6')
insert into @.agency values (2, 'Ralph''s Plumbing', 1, '7/7/6')
insert into @.AgencyHist values (2, 8, 'Ralph''s Plumbing', 0, '5/7/5')
insert into @.AgencyHist values (2, 9, 'Ralph''s Plumbing', 1, '5/7/6')
insert into @.AgencyHist values (2, 10, 'Ralph''s Plumbing', 0, '7/7/6')
insert into @.agency values (3, 'Tricky Ricky Taffy', 1, '4/19/6')
insert into @.AgencyHist values (3, 11, 'Tricky Ricky Taffy', 0, '9/9/5')
insert into @.AgencyHist values (3, 12, 'Tricky Ricky Taffy', 1, '10/9/5')
insert into @.agencyHist values (3, 13, 'Tricky Ricky Taffy', 0, '4/19/6')
insert into @.agency values (4, 'Gopher Tunnelling', 1, '7/14/6')
insert into @.agency values (5, 'Random Certainty Co', 1, '12/1/5')

/*insert into @.agency values (11, 'Bad Records 1', 0, '4/21/6')
insert into @.AgencyHist values (11, 14, 'Bad Records 1', 0, '2/14/6')
insert into @.agencyHist values (11, 15, 'Bad Records 1', 1, '4/21/6')

insert into @.agency values (12, 'Bad Records 2', 0, '7/7/6')
insert into @.AgencyHist values (12, 16, 'Bad Records 2', 1, '6/1/6')
insert into @.agencyHist values (12, 17, 'Bad Records 2', 1, '7/7/6')
insert into @.agency values (13, 'Bad Records 3', 0, '11/24/6')
insert into @.AgencyHist values (13, 18, 'Bad Records 3', 1, '9/14/6')
insert into @.agencyHist values (13, 19, 'Bad Records 3', 0, '10/21/6')
insert into @.agencyHist values (13, 20, 'Bad Records 3', 1, '11/24/6')
*/
--print '-- @.AGENCY --'
-- select * from @.agency
-- select * from @.agencyHist
DECLARE
@.StartDate DATETIME,
@.EndDate DATETIME,
@.TempFromDate DATETIME,
@.TempToDate DATETIME,
@.TotalRows INT,
@.LoopCount INT,
@.FromYear INT,
@.ToYear INT,
@.FromMonth INT,
@.ToMonth INT


DECLARE @.tempOutput TABLE
(
CountId INT IDENTITY(1,1) PRIMARY KEY,
Mnth CHAR(3),-- 1 to 12
Yr INT, -- 4 digit
StartDate DATETIME,
EndDate DATETIME
)

SELECT @.FromYear =2006,
@.ToYear =2006,
@.FromMonth =1,
@.ToMonth =12


SELECT @.StartDate = CAST(LTRIM(RTRIM(CAST(@.FromMonth AS CHAR(2)))) + '-01-' + CAST(@.FromYear AS CHAR(4)) AS DATETIME)

SELECT @.EndDate = CAST(LTRIM(RTRIM(CAST(@.ToMonth AS CHAR(2)))) + '-'
+ CAST(DAY(DATEADD(d, -DAY(DATEADD(m,1,CAST(CAST(@.ToMonth AS CHAR(2)) + '-01-'
+ CAST(@.ToYear AS CHAR(4)) AS DATETIME))),DATEADD(m,1,CAST(CAST(@.ToMonth AS CHAR(2))
+ '-01-' + CAST(@.ToYear AS CHAR(4)) AS DATETIME)))) AS CHAR(2)) + '-'
+ CAST(@.ToYear AS CHAR(4)) + ' 23:59:59.000' AS DATETIME)

SELECT @.LoopCount = 1
,@.TotalRows = DATEDIFF(Month, @.StartDate, @.EndDate) + 1
,@.TempFromDate = @.StartDate

SELECT @.TempToDate = CAST(LTRIM(RTRIM(CAST(DATEPART(Month,@.StartDate) AS CHAR(2)))) + '-'
+ CAST(DAY(DATEADD(d, -DAY(DATEADD(m,1,@.StartDate)),DATEADD(m,1,@.StartDate))) AS CHAR(2)) + '-'
+ CAST(LTRIM(RTRIM(DATEPART(Year,@.StartDate))) AS CHAR(4)) + ' 23:59:59.000' AS DATETIME)

-- Insert required number of rows
WHILE @.LoopCount <= @.TotalRows
BEGIN
INSERT INTO @.tempOutput
SELECT LEFT(CONVERT(CHAR(10),@.TempFromDate,107),3), YEAR(@.TempFromDate), @.TempFromDate, @.TempToDate
SET @.LoopCount = @.LoopCount + 1
SET @.TempFromDate = DATEADD(Month,1,@.TempFromDate)
SET @.TempToDate = CAST(LTRIM(RTRIM(CAST(DATEPART(Month,@.TempFromDate) AS CHAR(2)))) + '-' + CAST(DAY(DATEADD(d, -DAY(DATEADD(m,1,@.TempFromDate)),DATEADD(m,1,@.TempFromDate))) AS CHAR(2)) + '-' + CAST(LTRIM(RTRIM(DATEPART(Year,@.TempFromDate))) AS CHAR(4))
+ ' 23:59:59.000' AS DATETIME)

END
-- print temporary table with 12 records with start date and end date
-- select * from @.tempOutput


declare @.rawInterval table
( AgencyID integer not null,
startDate datetime not null,
endDate datetime not null,
primary key (endDate, startDate, AgencyID)
)
--insert into @.interval -- ONLY if the data is CLEAN!
insert into @.rawInterval
select a.AgencyID,
a.ActivationDt as startDate,
isnull (min (b.ActivationDt), '12/31/3999 23:59:59.997') as endDate
from ( select AgencyID,
AgencyName,
ActivationDt
from @.agency
where ActiveInd = 1
union
select AgencyID,
AgencyName,
ActivationDt
from @.agencyHist
where ActiveInd <> 1
) a
left join
( select AgencyID,
AgencyName,
ActivationDt
from @.agency
where ActiveInd <> 1
union
select AgencyID,
AgencyName,
ActivationDt
from @.agencyHist
where ActiveInd = 1
) b
on a.AgencyID = b.AgencyID
and a.ActivationDt < b.ActivationDt
group by a.AgencyID, a.ActivationDt
-- print '- RAW INTERVAL -'
--select * from @.rawInterval

-- New Agency Code
declare @.firstTime table
( monthBasis datetime not null,
newActiveCt integer not null
)

insert into @.firstTime
select convert (datetime, activationMonth + '/1/' + activationYear),
newActiveCt
from ( select convert (varchar(2), month (ActivationDt)) as activationMonth,
convert (varchar(4), year (ActivationDt)) as activationYear,
count (AgencyID) as newActiveCt
from ( select AgencyID,
min (ActivationDt) as ActivationDt
from ( select AgencyID,
min(ActivationDt) as ActivationDt
from @.agency
where ActiveInd = 1
group by AgencyID
union
select AgencyID,
min (ActivationDt)
from @.agencyHist
where ActiveInd = 1
group by AgencyID
) j
group by AgencyID
having min (ActivationDt) >= @.StartDate
) x
group by convert (varchar(2), month (ActivationDt)),
convert (varchar(4), year (ActivationDt))
) act
-- print new agencies
-- select * from @.firstTime


-- exisitng agency code
declare @.output table
( period varchar (15) not null,
monthBasis datetime not null,
ExistingActiveCt integer not null,
Mnth char(3) not null
)

insert into @.output
select period,
monthBasis,
sum ( case when i.AgencyID is null then 0 else 1 end ) as existingActiveCt,
Mnth
from (
select Mnth,Yr as period ,StartDate as monthBasis from @.tempOutput
) m
left join @.rawInterval i
on dateadd (month, 1, m.monthBasis) > i.startDate
and ( m.monthBasis <= i.endDate or i.endDate is null )
group by monthBasis, period, Mnth
order by monthBasis, period, Mnth

-- print existing agencies
-- select * from @.output

-- existing agencies and new agencies
select a.period,
a.ExistingActiveCt,
isnull (b.NewActiveCt, 0) as NewActiveCt,
a.monthBasis,
a.Mnth
from @.output a
left outer join @.firstTime b
on a.monthBasis = b.monthBasis
order by a.monthBasis

Wednesday, March 21, 2012

Please Assist... Report Templates to save time in designing

In RS 2000 I was able to create a template report and put it in the Project
Items directory, then when I would select New Report Item, I could choose my
template report instead of redesigning everything from scratch.
Where is this folder, or to better phrase this question:
Where do I put my template reports that I want to show up when I choose "Add
new report item" in the designer in SQL 2005 RS?
I have checked the folders - but obviously I am missing something.
Thanks in advance!
=-ChrisI had to search through my computer for *.rdl files. Finally I think I found
the templates at
C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
Kaisa M. Lindahl Lervik
"Chris Conner" <Chris.Conner@.NOSPAMPolarisLibrary.com> wrote in message
news:uOtrsue%23GHA.1220@.TK2MSFTNGP05.phx.gbl...
> In RS 2000 I was able to create a template report and put it in the
> Project
> Items directory, then when I would select New Report Item, I could choose
> my
> template report instead of redesigning everything from scratch.
> Where is this folder, or to better phrase this question:
> Where do I put my template reports that I want to show up when I choose
> "Add
> new report item" in the designer in SQL 2005 RS?
> I have checked the folders - but obviously I am missing something.
> Thanks in advance!
> =-Chris
>

please .....i need help

hi ...
how could i create report with vc++ using crystal report ?and how to use crystal report view class?? is there any tutorial or sample code avaliable somewhere .
thanks alot for interest in my query .See if you find tutorials here
support.businessobjects.com

Tuesday, March 20, 2012

Plain text (fixed length field) report output?

I am desperate to get output from Reporting Services into a text
file. Any plugins, converters or technique that anybody knows of?On Aug 2, 12:20 pm, datam...@.gmail.com wrote:
> I am desperate to get output from Reporting Services into a text
> file. Any plugins, converters or technique that anybody knows of?
Outside of the export option of Reporting Services and the Report Mgr,
you would most likely need to design a custom asp.net application that
could output the results of an ADO.NET dataset. An SSRS report could
be executed programmatically (this link might help:
http://msdn2.microsoft.com/en-us/library/aa964126.aspx#sqldocum_topic7
). If exporting to PDF programmatically is an option, I would suggest
using the open source library iTextSharp (http://sourceforge.net/
projects/itextsharp/ ). Crystal Reports could be setup via a report
viewer control and cr.exe to programmatically export a report to text
via an application. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

placing two matrix data regions one below the other without spacin

On my report I want to place two matrix data regions, whereas the second
matrix data region is placed exactly below the first matrix data region -
without spacing.
The first matrix shows the data with the numbers for the year 2006 and the
second matrix shows exactly the same data but with the numbers for the year
2005 ! So I donâ't want to show the column header for the second matrix data
region again. Therefore I set the visibility of the column header textboxes
to hidden and the column header is not shown as expected.
But a spacing remains between the two matrix data regions and I donâ't know
how to to eliminate it. The spacing has the size (height) of the hidden
column header text boxes. Also rendering the report in Excel doesnâ't give the
correct result. I also want to avoid overlapping report items because this
will probably produce rendering problems too.
Who can help to get rid of the remaing spacing between the two matrix data
regions !?
Any hints are welcome !Try selecting the whole row of your column header, and set the Height (not
LineHeight) to 0.01cm (or whatever your measurements are.)
Also, make the background colour for the row the same as the cells under it,
making it look like the top cells are slightly bigger than the rest.
Kaisa M. Lindahl Lervik
"Timmo" <Timmo@.discussions.microsoft.com> wrote in message
news:A1D86284-DBE1-4BE8-9881-CED568E6D938@.microsoft.com...
> On my report I want to place two matrix data regions, whereas the second
> matrix data region is placed exactly below the first matrix data region -
> without spacing.
> The first matrix shows the data with the numbers for the year 2006 and the
> second matrix shows exactly the same data but with the numbers for the
> year
> 2005 ! So I don't want to show the column header for the second matrix
> data
> region again. Therefore I set the visibility of the column header
> textboxes
> to hidden and the column header is not shown as expected.
> But a spacing remains between the two matrix data regions and I don't know
> how to to eliminate it. The spacing has the size (height) of the hidden
> column header text boxes. Also rendering the report in Excel doesn't give
> the
> correct result. I also want to avoid overlapping report items because this
> will probably produce rendering problems too.
> Who can help to get rid of the remaing spacing between the two matrix data
> regions !?
> Any hints are welcome !
>|||Try selecting the whole row of your column header, and set the Height (not
LineHeight) to 0.01cm (or whatever your measurements are.)
Also, make the background colour for the row the same as the cells under it,
making it look like the top cells are slightly bigger than the rest.
Kaisa M. Lindahl Lervik
"Timmo" <Timmo@.discussions.microsoft.com> wrote in message
news:A1D86284-DBE1-4BE8-9881-CED568E6D938@.microsoft.com...
> On my report I want to place two matrix data regions, whereas the second
> matrix data region is placed exactly below the first matrix data region -
> without spacing.
> The first matrix shows the data with the numbers for the year 2006 and the
> second matrix shows exactly the same data but with the numbers for the
> year
> 2005 ! So I don't want to show the column header for the second matrix
> data
> region again. Therefore I set the visibility of the column header
> textboxes
> to hidden and the column header is not shown as expected.
> But a spacing remains between the two matrix data regions and I don't know
> how to to eliminate it. The spacing has the size (height) of the hidden
> column header text boxes. Also rendering the report in Excel doesn't give
> the
> correct result. I also want to avoid overlapping report items because this
> will probably produce rendering problems too.
> Who can help to get rid of the remaing spacing between the two matrix data
> regions !?
> Any hints are welcome !
>|||Hi Kaisa !
Thank you very much for your answer ! Unfortunately your hint didn't help. I
already tried to set the height of the row with the column headers to 0 cm
and also setting the height to 0.01 cm couldn't help because the system sets
the height automatically to 0.07937cm which seems to be some minimal height !?
Nevertheless, if another idea comes to your mind, I would appriciate it a lot.
Regards
Timmo
"Kaisa M. Lindahl Lervik" wrote:
> Try selecting the whole row of your column header, and set the Height (not
> LineHeight) to 0.01cm (or whatever your measurements are.)
> Also, make the background colour for the row the same as the cells under it,
> making it look like the top cells are slightly bigger than the rest.
> Kaisa M. Lindahl Lervik
> "Timmo" <Timmo@.discussions.microsoft.com> wrote in message
> news:A1D86284-DBE1-4BE8-9881-CED568E6D938@.microsoft.com...
> > On my report I want to place two matrix data regions, whereas the second
> > matrix data region is placed exactly below the first matrix data region -
> > without spacing.
> > The first matrix shows the data with the numbers for the year 2006 and the
> > second matrix shows exactly the same data but with the numbers for the
> > year
> > 2005 ! So I don't want to show the column header for the second matrix
> > data
> > region again. Therefore I set the visibility of the column header
> > textboxes
> > to hidden and the column header is not shown as expected.
> >
> > But a spacing remains between the two matrix data regions and I don't know
> > how to to eliminate it. The spacing has the size (height) of the hidden
> > column header text boxes. Also rendering the report in Excel doesn't give
> > the
> > correct result. I also want to avoid overlapping report items because this
> > will probably produce rendering problems too.
> >
> > Who can help to get rid of the remaing spacing between the two matrix data
> > regions !?
> > Any hints are welcome !
> >
>
>

Placing Sub Total Coulmn to the left of the coulumn in Matrix report

Hi,

If I am taking a Matrix and right clicking on the column header and click on the SubTotal then it always place that column on the right of it .If I want to place that column to the left of my original column then I can't do it.

Adding manual column and then puuting the Expresstion =Sum(Fields!MyCol.Value) is not halping as it will give me the same value that is there in the column instead of giving me the column

-Thanks,

Digs

Putting the same expression in the Row Group Header would give you some sort of a SubTotal to the left of your Data Column. However, this will obviously only give you only the sum and will not follow the same formatting & properties etc. as that in the Data Column.

HTH.

-Aayush