Problem Generating Report Through C#
May 12, 2008
Hi,
I have craated an interface for generating the rdl file through c# (User will select some fields for group and some for details and report will be generated accordingly). I am generating the XML for the rdl according to the schema. And the report is running fine in my local system where i am using sqlexpress but is not working in production. The problem is coming with the datasource as follows.
An error has occurred during report processing.
Cannot create a connection to data source 'SOP'.
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
I am using Integrated Authentication, below is the datasource code generated by c#
<DataSource Name="SOP">
<ConnectionProperties>
<IntegratedSecurity>true</IntegratedSecurity>
<ConnectString>Data Source=SIGMASQL;Initial Catalog=SOP</ConnectString>
<DataProvider>SQL</DataProvider>
</ConnectionProperties>
<rdataSourceID>36a274d3-f283-4ac9-9f26-401ddf14f733</rdataSourceID>
</DataSource>
When i am pasting the RDL xml to my BI project's Report it is giving preview properly, but after deployment it is not coming.
I have tried with SQL Authentication also by removing the IntegratedSqcurity element and changin g the connection string to add "sa" userid, but still it doesn't run and gives the same error and if i refresh the report with the refresh button of report viewer, it shows some Wrong String Format error.
When i am editing the dataset in the report designer(BI Project), the connection string is not storing password and username info in the xml of the rdl, i read somewhere that it stores these values in VS2005 and reporting service database with some encryption and don't keep in the xml. So it is seeming to me that i am not sending these credentials to reporting service while deployment through my c# code. Below is my deployment codebyte[] byteRDL;System.Text.UTF8Encoding encoder = new UTF8Encoding();
byteRDL = encoder.GetBytes(reportDefination);
Property[] rsProperty = new Property[10];
//Property property = new Property();Warning[] warnings;
warnings = rs.CreateReport(reportName, "/QuoteReports", true, byteRDL, null);
But i have no idea why it is not even running with Windows Authentication also.
I am in big trouble guys. Pls help. I have to show it to my client..
View 1 Replies
ADVERTISEMENT
Apr 28, 2015
We are generating excel report using report viewer at run time but if excel report having more then 65000 record generating error Microsoft. Reporting Services.OnDemandReportRendering.ReportRenderingException: Excel Rendering Extension: Number of rows exceed.
View 2 Replies
View Related
Mar 10, 2008
Hi
Below is the error message I receive when I try to generate a report in Systems Center Essentials 2007.
Can anybody help me in this regard?
An internal error occured on the report server. See the error log for more details. Could
not find stored procedure 'CopyChunksOfType'.
Thanks and Regards,
KMohan
View 7 Replies
View Related
Mar 11, 2007
I am using VS2003 and SQL Server 2000 with Reporting Services.
I try to generate the report but get an error "must declare the variable '@qcode'
I check the file quotation.rdl and i found it should have declared... it's like
</PageFooter>
<ReportParameters>
<ReportParameter Name="qcode">
<DataType>String</DataType>
<Nullable>true</Nullable>
<DefaultValue>
<DataSetReference>
<DataSetName>DS_quot_code</DataSetName>
<ValueField>quot_code</ValueField>
</DataSetReference>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>Quotation Code:</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>DS_quot_code</DataSetName>
<ValueField>quot_code</ValueField>
<LabelField>quot_code</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
I would like to know what trigger the problem and what shall i do so as to solve it?
Thank you.
View 3 Replies
View Related
Mar 4, 2001
we have data base in ms access and reports in crystal reports 5 recently we converted our data base to sql sever 7
and reports to crystal reports 8. when i opend directly in cystal reports and given data base connecting through oledb
i am getting reports but from the application it is in vb6 the report window is poping up and latter a error msg saying un able to open sql server
when i checked up the connection it is ok help me
anil
View 2 Replies
View Related
Feb 22, 2007
I have been generating report models for users to use with Report Builder and there is no data when they select the model. I noticed that the tables I chose did not have a primary key and when I chose a different table, with a primary key, and generated a model from it, then there was data for the user to use in Report Builder.
Is there a documented work around or will I need to set a primary key on each table?
View 3 Replies
View Related
Jul 6, 2007
Hi All,
I am using ssrs and vs2005 to develop reports.The deployed reports are placed in the source directory(c:source) and i am using a asp.net page with a button on it to generate a report in .Pdf format and after generation this Pdf document will be placed in a destination folder(c: arget).
Can anyone help me out in solving this or atleast direct me as how to go on with it?
thanks
View 4 Replies
View Related
Sep 10, 2007
Hi,
I Have a table below.
Query
PKEY id int
name varchar(128)
date_add DateTime
What is the SQL statement to get the number of query on each day?
the output should be date and quantity. There should still be an output even if there is no query on that day.
The only way I can think of is by a table-value UDF. (rough design)
function(startdate, enddate)
{
for each day from start to end
insert into result select count(*) from Query where date_add = currentDate
return
}
Is there a more efficient way to do this?
Thanks,
Max
View 1 Replies
View Related
May 27, 2005
Is there a way to programatically determine if a report should be generated from the cache or run against real-time data?
View 7 Replies
View Related
Aug 24, 2007
Hi all,
I have tried asking the same question in other forums. All i get is links
Please help me. I have the following requirement:
I have the following tables:
Theater - TheaterId, TheaterName, Revenues,locationid, stateid
State - StateId, StateName
Location - LocationId, LocationName, StateId
I want to generate reports that will tell me the revenue generated for each theater in each location in a state. I want to run a batch process which will loop through the 3 tables and will passing the location and state id as parameters one by one. I want each report to be generated as a pdf and stored in a location. How do I do this?
Thanks.
View 3 Replies
View Related
May 27, 2007
Hi ,
I have been using ms sql 2000 database for generating reports up till now . but now as per a new requirement , i have to obtain data for generating the report from sql express & not ms sql 2000 , and that too in offline mode . i do not know how the structure of data is there in sql express .
1)do we have data stored in tables? or do we use xml ?
2)do we write similar queries as we write in ms sql ??
3) and lastly what is this offline stuff ???
Can any one please throw some light on comparison between sql 2000 and sql express in these three points.
Thanks in advance
View 3 Replies
View Related
Apr 8, 2008
Wasted a lot of time figuring out the possible cause of this. I was working in connected mode (with VSS), and when it tried to create a Report Model (after doing all its validations/checks), it had to check-out the project file, which is normal. But before doing so, it tries to check-out the .dsv file as well (data source view file from which report model is being generated). While attempting this, the visual studio crashes.
I could never guess that this could be an issue. All the time I was trying to figure out if there was anything wrong with the data in my tables.
So, for me, a simple solution worked - check-out the .dsv file before you start creating data model. I hope this may save time for others...
View 1 Replies
View Related
Apr 20, 2006
My problem is this: How do I dynamically generate a Report Model Definition with c#?
Is there some sort of method I could call from the ReportingService2005 web service? Or some sort of APIs I could use?
If I didn't have a dynamic database structure, I would just create a Report Model Definition with BIS and then deploy the same model to each customer. However, our product creates additional tables in the database, depending on what data users wish to collect.
There are currently 2 solutions for this problem. First, I can manually create a Report Model Definition through the Buisness Intelligence Studio (BIS). However, I wish to be able to dynamically generate the report model without having to go through BIS. Second, I could use C# and manually write the XML of the SMDL. However this seems problematic.
I'm really hoping for some MS API that I'm missing out on here. Thanks for the help.
- Sean
View 9 Replies
View Related
Jan 2, 2007
Daily report generating Monthly rollup stats
I have a daily report which each morning generates monthly information for the current month which was implemented in December. Everything was working correctly untill January 1st. On the 1st the report generated blank since it was suppose to generate 1-31 Dec but but the currently month was Jan, so it failed. How do I program it so if it is the 1st of a month generates the previous month but still would generate current month but while in the current month? Any help is appreciated.
SELECT GETDATE() - 1 AS rptdate, Errors.WTG_ID, lookup.Phase, Errors.STATUS_TYPE, Errors.STATUS_CODE, STATUS_CODES.STATUS_DEF, Errors.TIME_STAMP,
Errors.ANSI_TIME, lookup.WTG_TYPE, Errors.POSITION
FROM Errors INNER JOIN lookup ON Errors.WTG_ID = lookup.WTG_id RIGHT OUTER JOIN STATUS_CODES ON Errors.STATUS_CODE = STATUS_CODES.STATUS_CODE AND lookup.WTG_TYPE = STATUS_CODES.WTG_TYPE
WHERE (STATUS_CODES.STATUS_DEF IS NOT NULL) AND (Errors.TIME_STAMP BETWEEN DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0) AND DATEADD(mm, DATEDIFF(m, 0, GETDATE()) + 1, 0))
ORDER BY Errors.WTG_ID, Errors.TIME_STAMP, position
View 5 Replies
View Related
Dec 12, 2007
Hi
I was wondering if it was possible to call reporting server web service directly from my sql server stored procedure. The call that I need to make to reporting web service needs to generate the report in a PDF format.
View 1 Replies
View Related
Mar 7, 2007
When creating a report using reporting Services with a cube as a datasource, visual studio 2005 hangs. I have applied SP1 to visual studio.net 2005 .
This is the query generated by query designer in reporting services. When I try to drag and drop another dimension to slice it by , visual studio hangs.
The fact table has just 10,000 records. Are the number of dimensions used to slice the cube too many? How do I optimize this query?
SELECT NON EMPTY { [Measures].[Avg MT Rate - Speech], [Measures].[Change in Avg MT Rate], [Measures].[Edited Lines Per 1000], [Measures].[Speech Utilization], [Measures].[Time Saved %], [Measures].[Speech Edited for Rev 1], [Measures].[Change in Account Productivity], [Measures].[Hours Saved], [Measures].[Lines Per 1000], [Measures].[Average MT Rate - Total Production], [Measures].[Typed Lines], [Measures].[Productivity Time in hours - Edited Docs],[Measures].[Productivity Time in Hours - Typed Docs],[Measures].[Productivity Time in Hours]} ON COLUMNS, NON EMPTY { ([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS * [Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS * [Dim Date].[The Month].[The Month].ALLMEMBERS * [Dim Date].[The Year].[The Year].ALLMEMBERS * [Dim MT].[Creator Last Name].[Creator Last Name].ALLMEMBERS * [Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( STRTOMEMBER(@FromDimDateTheYear, CONSTRAINED) : STRTOMEMBER(@ToDimDateTheYear, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOMEMBER(@FromDimDateTheMonth, CONSTRAINED) : STRTOMEMBER(@ToDimDateTheMonth, CONSTRAINED) ) ON COLUMNS FROM [ETL DW])) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
View 1 Replies
View Related
Jan 19, 2004
hi,
I am developing a ASP.NET application using SQL Server as my database.
I want to create a number that is unique.
The number will have 8 digits.
first 2 digits correspond to year. ex:04 or 03
the next 6 digits start with 000001 and it should get added for each new entry of data.
i am not able to generate number in the way i said. I am relatively new to SQL. so any suggestions as how to go about solving the problem???. Are there any samples/codes available for this.
Any help would be highly appreciated.
thanks,
-sriram
View 7 Replies
View Related
May 31, 2001
Hi all,
I have generated an SQL script such that when it is run, it will automatically create tables if not existing or drop the existing tables. The problem I have is that, is there any way I can also make the script create not only the tables but also transfer the data from the old database to the new database?
I would really appreciate if any of you could point me to any existing programs, scripts etc that can do that. Thanks in advance
Regards,
Celia
View 1 Replies
View Related
Oct 8, 1999
Is there a way to generate SQL Scripts from a stored procedure?
For disaster recovery and documenation reasons, we'd like to create scripts of our databases periodically. I, being somewhat lazy, would like to automate this so I really don't have to remember to run this every so often.
Any help would be appreciated.
View 1 Replies
View Related
Jun 7, 1999
Is there a way to generate SQL scripts from other than SQL Enterprise Manager?
View 3 Replies
View Related
Oct 29, 2014
I must produce an XML file with this layout:
Code:
<root>
<dataroot>
<Professions>
<Profession>web designer</Profession>
<tags>
<tag>Ruby on Rails</tag>
<tag>Apache</tag>
<tag>HTML/CSS</tag>
[code]...
I can't get my head around it ..I've even tried to solve it by using FOR XML RAW.
View 3 Replies
View Related
May 13, 2008
Hi
I am unable to see how to generate a leading zero.
Table A
declare @TableA table ( ID numeric ,
Fruits varchar(10)
)
insert @TableA
select 1,'Oranges'
union all select 2,'Mangoes'
union all select 3,'Apricots'
ID Table A
1 Apples
2 Oranges
3 Grapes
4 Apricots
declare @TableB table ( seed numeric ,
)
insert @TableB
select 080513000448
union all select 080513000449
union all select 080513000450
Table B
seed
080513000448
080513000449
080513000450
I wrote the following query but i need generate a leading zero not sure which function can help maybe the right function but i am not sure how to use it in this case
SELECTconvert(varchar(10), getdate(), 12) +
(SELECT
CASE
WHEN SUBSTRING(ISNULL(max(seed),'00000'),1,6) = convert(varchar(10), getdate(), 12)
THEN SUBSTRING(ISNULL(max(seed),'00000'),7,12)
ELSE '000000'
END AS SEED
FROM B)
+ (row_number()
over (order by Id))
as SEED
FROM A
SEED
----
80513000451
The output which i need is
SEED
----
080513000451
rather then
SEED
----
80513000451
regards
Hrishy
View 20 Replies
View Related
May 12, 2007
A simple question! I would like to create a database that creates say serial numbers and saves them to a table. If poss I would like to create them on demend and not duplicate.....
I have blank page syndrome!!!!
Thanks in advance
View 2 Replies
View Related
Feb 19, 2008
Can anyone suggest a case-study/reference links/video demos for creating a cube using Analysis Services and generation of reports using Reporting Services.
Thank You
View 2 Replies
View Related
Mar 15, 2008
Guys,
I have to generate sequence for distinct group of values for example
intially seq is set to 1 through out the table
categorydescidseq
__________________________________
AccountingAccounting61
AccountingAccounting72
AccountingFinal81
AccountingFinal92
AddendumAddendum 101
Is there any way to accomplish this?
Any suggestions and inputs would help
Thanks
View 4 Replies
View Related
Mar 31, 2008
hi
how can we generate the data in csv files of database tables by using sql query?
regards
View 3 Replies
View Related
Aug 24, 2006
Help again please,I need to insert rows into a table from another table. The tables areidentical column wise except the table im inserting from does not havea primary key value. On insert I need to generate a primary key thatis consecutive based on the table im inserting into. Also the table iminserting into does not have a identity column. Much appreciated.
View 7 Replies
View Related
May 12, 2006
Hi,
we would like to generate SSIS packages(connections, data flow tasks, etc..) programatically using C#. Is it possible to do so?
At present we are creating packages by dragging and dropping required componets from toolbox and configuring them manually. We have a requirement of creating around 300 packages every week. Manual creation of packages is really a nightmare.
I heard from one of friends that using c# we can create packages. is it true? if so, can we view/edit the packages generated using c# using VS 2005 IDE(if required) ?
Regards,
Gopi
View 4 Replies
View Related
Mar 29, 2007
Hello,
SRS 2005 provides functionality for loading and rendering reports on fly using LoadReportDefinition and Render methods defined in ReportExecutionService webservice.
I was wondering if the same/similar behaviour can be accomplished in Reporting Services 2000.
Thanks in advance,
Kobi
View 1 Replies
View Related
Jul 12, 2007
What does N indicate in the following script
SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].xxxx' )
Plz can anyone explain
EXEC dbo.sp_executesql @statement = N'Create View xxxxx'
View 4 Replies
View Related
Oct 17, 2006
I've been given an excel file that lists:
userID's,
Names
Password
expiary dates.
I need to convert this list into sql server logins. Can this be done via a tsql statement? if so how, and if it cant be done via a statement then what other way can it be done.
Many thanks in advance.
View 2 Replies
View Related
Sep 18, 2007
I'm having problems generating the primary key for a sql server table. I use a slowly changing dimension to discriminate modified and new records. The primary key in the SQL Server table is a combo number/letter incremental (ex. 0000A, 0001A...9999A, 0000B...). I tried creating Instead of insert and For insert trigger for a table but this doesn't seem to do the work.
What are my other options? How can I generate a primary key for every new row?
Any advice is appreciated.
Regards
Sara
View 6 Replies
View Related
May 20, 2008
Hello all,
I have a few questions relating to scripts and I'm looking for some help, or at least a point in the right direction.
1) I'm generating CREATE scripts to move a number of tables/procedures/functions from my testing database to my production database. The issue I have is the script doesn't seem to be generated in a particular order, so I'm getting errors when a table/procedure/function is created that references something that hasn't been created yet. Is there a setting available to create the script in a specific order to prevent these errors?
2) This is somewhat related to the first question. I need to drop all the tables/procedures/functions before I re-create them. Can I set all the DROPs at the beginning of the script, and then run all the CREATEs?
3) Eventually the database will be ready for production and in use. And eventually I'll be asked to make changes, without erasing existing data. Can I accomplish this using the generate scripts feature? What topics should I be investigating when looking into conducting these types of updates? "Updating database" is too general and I'm not sure the technical term. I've done very simple DB-related tasks so I'm trying to figure out what I'm looking for so I can educate myself. Basically, I don't know what I don't know.
Any help is appreciated. Thanks.
View 1 Replies
View Related