Here's the method i want to write:
public static IEnumerable<String> GetTableNames(this IQueryable<T> query)
{
//...
}
where the IQueryable is a linq-to-sql query (is there a more specific interface i should use?).
then if i had a query like this
var q = from c in db.Customers
from p in db.Products
where c.ID = 3
select new {p.Name, p.Version};
q.GetTableNames();// return ["Customers", "Products"]
basically it would show all the tables that this query touches in the db, it is ok to execute the query to figure this out too (since that is going to happen anyway)? any ideas?
I am trying to write a simple web app (C# or VB.NET) to display a set of reports/subreports, but I can't seem to get access to the ReportViewer control.
I am using VS.NET express (2005 and 2010) and I know I need the reportviewer pluglin. but I have installed it but I can't seem to get it to appear in the toolbox.
I have tried to add a reference but VS does not like the DLL :P
Please guide me through a walk through!
Thanks.
M
Hi,
I have developed mailserver using postfix. I used mailgraph for generating the daily, weekly, monthly, yearly reports. But I want to make reports of mail which has sender, recipient, subject, etc.
What should I do?
Please help me....
I tried to exclude some classes from cobertura as specified in this site
<cobertura-instrument todir="${voldemort.instrumented.dir}" datafile="${cobertura.instrument.file}">
<classpath refid="tools-classpath" />
<ignore regex=".*\.xsd" />
<fileset dir="${voldemort.dist.dir}/classes">
<include name="**/*.class" />
<exclude name="**/client/protocol/pb/*.class"/>
<exclude name="**/server/http/*.class"/>
</fileset>
</cobertura-instrument>
but that doesn't work
help me out, pleaseeeeeeeeeeee
Assume I have the following:
typedef struct {
char *name;
char binding;
int address;
} Fn_Symbol //definition of function symbol
static Fn_Symbol *fnSymbols; //array of function symbols in a file
statc int total; //number of symbol functions in the array and file
static void PrintBacktrace(int sigum, siginfo_t * siginfo, void *context)
{
printf("\nSignal received %d (%s)\n", signum, strsignal(signum));
const int eip_index = 14;
void *eip = (void *)((struct ucontext *)context)->uc_mcontext.gregs[eip_index];
printf("Error at [%p] %s (+0x%x), eip, fnName, offset from start); //?????
exit(0);
}
I have this so far, but what is the best way using the fnSymbols static global pointer to identify the function where the error occured and then back trace through the stack to identify each calling function by address, name, and offset?
Hi,
On a 2003 server box, with SQL server 2008 installed (ReportServer deployed in IIS mode), I've got a virtual directory within IIS with it's security set to 'windows authentication', with the following html code:
<body>
<h1>test</h1>
<iframe src="/reportserver" witdh="50%" height="50%" />
</body>
From the outside, I've got a first login/pwd box displayed to access the html code, then a second one to display the content of the iframe.
On the same type of server, but with SQL Server 2005, I don't have this issue (i.e. only one login box).
My thought is that the first token should give acces to both the page and the iframe, isn't it?
Any hints on how to setup the reportserver to fix this?
thanks.
I want to create some charts using sql reporting services. But i am unable to use a lot of functions and operators in combination with my data-fields
the following work(Stroke-data type is decimal):
> =Fields!Stroke.Value
> =Sum(Fields!Stroke.Value)
> =First(Fields!Stroke.Value)
> =Last(Fields!Stroke.Value)
> =2+2394.12
the following dont work:
> =Fields!Stroke.Value + 2
> =CStr(Fields!Stroke.Value)
> =CDbl(Fields!Stroke.Value)
> =Fields!Stroke.Value / Fields!Stroke.Value
> =Sum(Fields!Stroke.Value) * 2
all other operators and functions(using Fields!Stroke.Value) dont work too
I'm looking for a pattern (or good practice) for the following scenario:
My function List<BatchItemResponse> Process(List<BatchItem> Data) {..} will process a list of data, and return info on where each item in the batch could be processed.
struct BatchItemResponse { int BatchItemID; bool Processed; string Description; }
Any thoughts? Is what I've proposed as good as it gets?
I'm looking for a free templating engine to generate simple reports. I want some basic features such as :
Ability to Write Loops (with any IEnumerable)
Passing Variables
Passing Templates Files (main template, footer, header)
I'll use this to generate reports in HTML and XML. I'm not looking for a ASP.NET Template Engine.
This is for a WinForms applications.
I've seen this question http://stackoverflow.com/questions/340095/can-you-recommend-a-net-template-engine, however all of those template engines are total overkill for me and focused for ASP.NET.
Please only recommend free libraries.
// I'm still looking an NVelocity but it doesn't look any promising for .NET, overly complicated, when you download it's bunch of files not clear what to do, no tutorial, startup document etc.
Hi,
I am developing an iphone app. Instruments reported a leaked object ServiceTypes. Below is the relevant code. Does anyone have any ideas? Thanks a lot for your help.
ServiceTypes *serviceTypes = [[ServiceTypes alloc] init];
if ([userConnection getServiceTypes:serviceTypes]) {
if ([serviceTypes.types length] 0) {
NSArray *array = [[NSArray alloc] initWithArray:[serviceTypes.types componentsSeparatedByString: SERVICE_TYPE_DELIMITOR]];
serviceRequestTypes = [[NSMutableArray alloc] initWithArray:array];
[array release];
}
}
[[self typesTableView] reloadData];
[serviceTypes release];
Here is my data model from my application:
id :integer(4) not null, primary key
spam :boolean(1) not null
duplicate :boolean(1) not null
ignore :boolean(1) not null
brand_id :integer(4) not null
attitude :string not null
posted_at :datetime not null
Attitude could have 3 states: negative, positive, neutral.
I want to generate resultset in table, this way, for each day between start and end date:
date | total | positive | neutral | negative
2009-10-10 | 12 | 4 | 7 | 1
(...)
2009-10-30 | 5 | 2 | 1 | 1
And ignore all records which have:
duplicate = true
ignore = true
spam = true
How it's could be done?
DataTable reportData = this.GetReportData(startId, endId, empId, minAmount, reportType);
ReportViewer reportViewer = new ReportViewer();
reportViewer.ProcessingMode = ProcessingMode.Local;
reportViewer.LocalReport.ReportEmbeddedResource = "PDCL.ERP.Modules.Marketing.Reports.rptDoctorDetail.rdlc";
ReportDataSource ds = new ReportDataSource();
ds.Name = "DoctorDetail_Report";
ds.Value = reportData;
reportViewer.LocalReport.DataSources.Add(ds);
reportViewer.RefreshReport();
this.WindowsFrmHost.Child = reportViewer;
this is my code.I'm using SSRS but the viewer only shows but not any data.
Why..?
Hello Friends,
Actually I am working on Pdf by using IReport Software. This software provided two detail section but i want this two detail section with Column Header .then say me how i changes it
reply me on [email protected]
Hi
Any idea how to calculate the height of auto generated child controls in fixed-page... When using ActualHeight it give 0.0....
I need to to calculate height of the dynamic content in the fixed page.
Thanks and Regards
I got this error and dont know what could be the cause. Any idea?
Problem at line 2127 character 18: Bad for in variable 'sport'.
for (sport in sugested_sports)
thx alot.
I need to import either csv or excel file into a dbase. The column headers will match but I will want to compare the file against the dbase using an ItemID field, list the rows to be affected and the differences, then allow an update to all the rows with the matching ID.
Hi,
I am trying to display a table to display of products (rows) in a single A4 fixed layout page.
I manage to add a table with header/detail/footer sections but I can not set a minimum heigth for the detail section (150mm for example).
If I set a 150mm heigth on the detail row, then Each row will have that 150mm heigth.
Whereas I would like, each row to have a minimal heith (could be on several line if the content of some columns is wrapped).
+---------+--------+--------------+
Tbl Hdr | col1 | col2 | col3 |
+---------+--------+--------------+
Tbl Dtl | [val1] | [val2] | [val3] |
+---------+--------+--------------+
| | <-should have a variable heigth
+---------+--------+--------------+
Tbl Ftr | | | Total |
+---------+--------+--------------+
If a set not heigth on the detail row then the footer comes, right beneath the detail rows, instead of sticking at the bottom of the page :-(
I hope this makes sense (if not I could provide more details).
Any help would be greatly appreciated.
Thanks in advance.
Hi All Master,
I have a running total and would like to stop it when condition is match.
Eg :- I have STOCK qty 100pcs ; qty are accumulate from Purchase Order Receiving transactions as below :
No. Qty Accumulate
1. 20 20
2. 30 50
3. 10 60
4. 40 100
5. 20 120
The running total should stop at no.4, because it have reach the STOCK qty 100.
Thanks in advance.
I'm making an application that generates reports for my client. I'm using his database that contains stored procedures which return the data needed for the reports. The problem is that I don't know how to execute them from the application (more specific the TableAdapter in my dataset). When I use the visual aid to create the TableAdapter, it shows the error "Invalid object named #table1". This is weird because there is a temporary table called #table1 in the stored procedure.
When I try to do the whole job programmatically, I get the exception
Incorrect syntax near '.'.
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
I created a DataTable that has identical structure as the result of the stored procedure, but I still get the same exception
Hi all,
This is my first post ever -- I love the Android SDK (been at it for a week), but I did notice a small typo in the official documentation that needs correcting. Not sure if this is where I post it, but on this page:
http://developer.android.com/reference/android/os/CountDownTimer.html
within the example source code, the source says "CountdownTimer" on line one when it should say "CountDownTimer" (notice the capitalization of the letter "D"). An easy fix for one with programming experience, but the code as written will not compile, which could be confusing for someone using this code for the first time. Is this where documentation bugs are submitted, and if not, where should I go to request the fix?
Thanks all!
When I get a field, this work good.
But, when get a field from a 'VIEW', is a problem because the code of a VIEW is:
CREATE OR REPLACE VIEW tabla_clientes AS
SELECT id_cliente,nombre, CONCAT('$ ',FORMAT(monto_a_favor,0), '???'), CONCAT('$ ',FORMAT(calcular_monto_por_cobrar_cliente(id_cliente),0))
FROM cliente;
When I compile this. Appears errors from the name of fields.
Description | Object
----------------------------------------------------------------------------
Syntax error, insert ";" to complete BlockStatements | ${CONCAT('$ ',FORMAT(monto_a_favor,0)}
Syntax error on tokens, delete these tokens | ${CONCAT('$ ',FORMAT(monto_a_favor,0)}
Syntax error on token ",", delete this token | ${CONCAT('$ ',FORMAT(monto_a_favor,0)}
If I change the name at this field appears other error.
Hi I am using Crystal Reports 10 to generate my reports. In one of the reports I see that a group header is getting repeated 2 times in the output document while in the design tab I can that it is present only one time. I am having my query as a "Union All" of 2 data sets.
Please advise what could be the cause. Thanks.